Stub Article
This article needs more information, clarification, or completion.
You can help us by expanding this article. There may be more information on its talk page.
The Colors and Crayons library implements first-class colors in Snap!. The colors are represented by one-pixel costumes that are used by other blocks for calculations. Variables set by the library are preceded by ✐ to distinguish them from other variables.
@brush set pen [ V] to [ v] [] @delInput @verticalEllipsis @addInput :: pen ([] :: pen) (@brush pen [ V] :: pen) @brush change pen [ V] by () :: pen (@brush color [#ff0000] :: pen) (@brush mix colors ➤ @delInput @verticalEllipsis @addInput using [ V] rules :: pen) (@brush color from [ V] [ v] [] @delInput @verticalEllipsis @addInput :: pen) (@brush [ V] from color ➤ :: pen) (✐ current pen color :: pen) ✐ set pen to crayon [ v] @list :: pen set pen color to r: (255) g: (0) b: (0) :: pen set pen color to h: (0.3) s: (0.7) v: (0.6) :: pen (RGB color :: pen) (HSV color :: pen) (✐ hexchar [] :: pen)